Replay

interface Replay : Stream

Base replay stream interface.

This interface exposes primitives for controlling media streams, which have a known duration, as well as a current position, which may furthermore be controlled by seeking through the stream.

Inheritors

Types

Link copied to clipboard
Media replay stream playback state.

Functions

Link copied to clipboard
@IntRange(from = 0)
abstract fun duration(): Long
Informs about total playback duration.
Link copied to clipboard
Opens a sink from this stream.
Link copied to clipboard
abstract fun pause(): Boolean
Requests playback to pause.
Link copied to clipboard
abstract fun play(): Boolean
Requests playback to start.
Link copied to clipboard
Informs about current playback state.
Link copied to clipboard
@IntRange(from = 0)
abstract fun position(): Long
Informs about current playback position.
Link copied to clipboard
abstract fun seekTo(@IntRange(from = 0) position: Long): Boolean
Requests playback position change.
Link copied to clipboard
abstract fun state(): Stream.State
Informs about current stream state.
Link copied to clipboard
abstract fun stop()
Stops the stream.